// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_view;

import android.os.Handler;
import android.view.animation.Animation;
import android.view.animation.Transformation;

// Referenced classes of package com.nnee.p_pr.p_activity.view:
//            cls_FlingGallery, a, ap

class bl extends Animation
{

    public bl(cls_FlingGallery flinggallery)
    {
        a = cls_FlingGallery;
        super();
        h = -1;
        b = false;
        d = 0;
        e = 0;
        f = 0;
        g = 0;
    }

    private void a()
    {
        int i;
        int j;
        int k;
        if(g > 0)
        {
            i = cls_FlingGallery.a(a, d);
            j = cls_FlingGallery.c(a, cls_FlingGallery.b(a));
            k = cls_FlingGallery.b(a, d);
        } else
        {
            i = cls_FlingGallery.b(a, d);
            j = cls_FlingGallery.d(a, cls_FlingGallery.b(a));
            k = cls_FlingGallery.a(a, d);
        }
        cls_FlingGallery.f(a)[d].c(d);
        if(cls_FlingGallery.f(a)[i].b() != j)
            cls_FlingGallery.f(a)[i].e(j);
        if(i != k)
            cls_FlingGallery.f(a)[k].c(d);
        cls_FlingGallery.f(a)[0].a(f, 0, d);
        cls_FlingGallery.f(a)[1].a(f, 0, d);
        cls_FlingGallery.f(a)[2].a(f, 0, d);
        cls_FlingGallery.f(a)[0].d(d);
        cls_FlingGallery.f(a)[1].d(d);
        cls_FlingGallery.f(a)[2].d(d);
        b = false;
        if(cls_FlingGallery.p(a) != null)
            cls_FlingGallery.p(a).a(cls_FlingGallery.b(a));
        if(cls_FlingGallery.g(a) != null)
            cls_FlingGallery.g(a).sendEmptyMessage(100);
    }

    public void a(int i)
    {
        byte byte0 = -1;
        cls_FlingGallery.a(a, true);
        c = false;
        if(d != i)
        {
            if(b)
            {
                int j;
                if(i == cls_FlingGallery.b(a, d))
                    j = 1;
                else
                    j = byte0;
                if(g < 0)
                    byte0 = 1;
                if(byte0 == j)
                {
                    cls_FlingGallery.f(a)[0].a(f, 0, d);
                    cls_FlingGallery.f(a)[1].a(f, 0, d);
                    cls_FlingGallery.f(a)[2].a(f, 0, d);
                }
            }
            d = i;
            c = true;
        }
        e = cls_FlingGallery.f(a)[d].c();
        f = cls_FlingGallery.a(a, d, d);
        g = f - e;
        setDuration(cls_FlingGallery.n(a));
        setInterpolator(cls_FlingGallery.o(a));
        b = true;
    }

    protected void applyTransformation(float f1, Transformation transformation)
    {
        if(f1 > 1F)
            f1 = 1F;
        int i = e + (int)(f1 * (float)g);
        h = i;
        for(int j = 0; j < 3; j++)
            if(g > 0 && j != cls_FlingGallery.a(a, d) || g < 0 && j != cls_FlingGallery.b(a, d))
                cls_FlingGallery.f(a)[j].a(i, 0, d);

    }

    public boolean getTransformation(long l, Transformation transformation)
    {
        boolean flag = false;
        if(!super.getTransformation(l, transformation))
            a();
        else
        if(cls_FlingGallery.q(a) || cls_FlingGallery.r(a) || h == 0)
            a();
        else
            flag = true;
        return flag;
    }

    final cls_FlingGallery a;
    private boolean b;
    private boolean c;
    private int d;
    private int e;
    private int f;
    private int g;
    private int h;
}
